/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#pragma once

namespace liba
{

template <class T> class Singleton
{
	//friend class T;

protected:
	Singleton() {}

public:
	static T * GetInstance()
	{
		static T *instance;

		if(instance)
			return instance;

		return instance = new T();
	}
};

}